package com.eastfair.venueservice.dao;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.eastfair.boot.mapper.SuperMapper;
import com.eastfair.boot.request.PageParams;
import com.eastfair.venueservice.dto.ServiceLossDTO;
import com.eastfair.venueservice.entity.ServiceLoss;

import com.eastfair.venueservice.vo.ServiceLossVO;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

/**
 * <p>
 * Mapper 接口
 * 报损记录
 * </p>
 *
 * @author linan
 * @date 2022-09-19
 */
@Repository
public interface ServiceLossMapper extends SuperMapper<ServiceLoss> {

    /**
     * 分页查询服务报损记录.
     *
     * @param page         the page
     * @param queryWrapper the query wrapper
     * @return the page
     */
    Page<ServiceLossVO> listServiceLossVO(Page<ServiceLoss> page,
                                          @Param(Constants.WRAPPER)QueryWrapper<ServiceLoss> queryWrapper);

    /**
     * 报损类型统计.
     *
     * @param queryWrapper the query wrapper
     * @return the map
     */
    List<Map<String, Object>> countLossNumByGoodsLossState(@Param(Constants.WRAPPER)QueryWrapper<ServiceLoss> queryWrapper);
}
